//
//  UILabel+SLSafe.m
//  SLKit
//
//  Created by S_LINE on 2020/12/18.
//

#import "UILabel+SLSafe.h"

#import "SLSafe.h"

@implementation UILabel (SLSafe)

- (void)sl_setText:(NSString *)text
{
    if ([SLSafe isEffectiveString:text])
    {
        self.text = text;
    }
    else if ([SLSafe isEffectiveNumber:text])
    {
        self.text = [NSString stringWithFormat:@"%@", text];
    }
    else
    {
        self.text = @"";
    }
}

@end
